{
	gROOT->ProcessLine(".L ~/work/geant4/tmp/Darwin-g++/g4test/libTTrackerHit.so");
	gROOT->ProcessLine(".L ~/work/geant4/tmp/Darwin-g++/g4test/libTEvent.so");

	TFile file("out.root","recreate");
	TTree *t= new TTree("t","Result");

	TEvent* evt = new TEvent();
	t->Branch("evt",evt);

	TTrackerHit aHit;
	aHit.SetHitType(TTrackerHit::PrimaryStopped);
	cout<<aHit.GetHitType()<<endl;
	aHit.SetHitType(TTrackerHit::ParticleEntered);
	cout<<aHit.GetHitType()<<endl;
	aHit.SetHitType(TTrackerHit::ParticleExited);
	cout<<aHit.GetHitType()<<endl;
	aHit.SetHitType(TTrackerHit::NewParticle);
	cout<<aHit.GetHitType()<<endl;
	aHit.SetHitType(5);
	cout<<aHit.GetHitType()<<endl;

	evt->SetNoOfDets(2);
	evt->SetNoOfHits(2);
	//evt->SetEdep(3,2);

	for (int i=0;i<100;i++)
	{
		evt->SetEvtId(i);
		//evt->AddHit(i);
		//evt->ShowHitType(i);
		//evt->SetEdep(1.+i);
		//evt->SetEdep(5,1);
		//evt->SetEdep(3,0);
		//evt->SetX(i/100.);
		t->Fill();
	}
	//t->Print();
	t->Write();

}
